import framework.api.KieContainer;
import framework.api.KieSession;

public class Sudoku {

    private KieContainer kc;
    public static Sudoku sudoku;
    private KieSession session;

    public Sudoku(KieContainer kc) {
        this.kc = kc;
        sudoku = this;
    }

    public void setCellValues(Integer[][] cellValues) {

        this.session = kc.newKieSession("mysudoks");

        Setting s000 = new Setting(0, 0, 0);

        int initial = 0;
        for (int iRow = 0; iRow < 9; iRow++) {
            for (int iCol = 0; iCol < 9; iCol++) {
                Integer value = cellValues[iRow][iCol];
                if (value != null) {
                    session.insert(new Setting(iRow, iCol, value));
                    initial++;
                }
            }
        }
        /*this.counter = new Counter(initial);
        this.session.insert(counter);
        this.session.delete(fh000);
        this.session.fireAllRules();*/
    }
}
